<?php
namespace app\serverqrcode\validate;
use app\manage\validate\BaseValidate;
/**
 * Created by PhpStorm.
 * User: 97606
 * Date: 2017/7/19
 * Time: 15:14
 */
class QrCode extends BaseValidate
{
    protected $rule = [
        'token'   => ['alphaNum','length'=>'1,32'],
        'appkey'  => ['alphaNum','length'=>'1,32'],
        'type'    => ['number'],
        'code_id' => ['number'],
        'url'     => ['url'],
    ];

    protected $message = [

    ];

    protected $scene = [
        'createQrCode' => ['token', 'appkey', 'type', 'code_id', 'url'],
        'gainQrCode'   => ['token', 'appkey', 'type', 'code_id'],
    ];
}